<template>
<!--  成绩详情  -->
    <div class="app-container">
        <el-form ref="form" :model="scoreForm" label-width="100px">
            <el-row>
                <el-col :span="8">
                    <el-form-item label="工号" prop="staffNo">
                        <el-input v-model="scoreForm.staffNo" size="small" :disabled="true"  />
                    </el-form-item>
                </el-col>
                <el-col :span="8">
                    <el-form-item label="姓名" prop="username">
                        <el-input v-model="scoreForm.username" size="small" :disabled="true"  />
                    </el-form-item>
                </el-col>
                <el-col :span="8">
                    <el-form-item label="部门" prop="deptName">
                        <el-input v-model="scoreForm.deptName" size="small" :disabled="true"  />
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="8">
                    <el-form-item label="项目代码" prop="projectCode">
                        <el-input v-model="scoreForm.projectCode" size="small" :disabled="true"  />
                    </el-form-item>
                </el-col>
                <el-col :span="8">
                    <el-form-item label="项目名称" prop="projectName">
                        <el-input v-model="scoreForm.projectName" size="small" :disabled="true"  />
                    </el-form-item>
                </el-col>
                <el-col :span="8">
                    <el-form-item label="考试日期" prop="examDate">
                        <el-input  size="small" v-model="scoreForm.examDate" :disabled="true"/>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="8">
                    <el-form-item label="交卷时间" prop="submitDate">
                        <el-input  size="small" v-model="scoreForm.submitDate"  :disabled="true"/>
                    </el-form-item>
                </el-col>
                <el-col :span="8">
                    <el-form-item label="答题用时(分)" prop="answerDate">
                        <el-input-number v-model="scoreForm.answerDate" size="small" controls-position="right"  :min="0" :max="8"
                                         :disabled="true" style="width: 100%;"/>
                    </el-form-item>
                </el-col>
                <el-col :span="8">
                    <el-form-item label="试卷总分" prop="totalPoints">
                        <el-input-number v-model="scoreForm.paperScore" size="small" controls-position="right"
                                         :disabled="true" style="width: 100%;"/>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="8">
                    <el-form-item label="机考成绩" prop="theoryScore">
                        <el-input-number v-model="scoreForm.theoryScore" size="small" controls-position="right"
                                         :disabled="true" style="width: 100%;"/>
                    </el-form-item>
                </el-col>
                <el-col :span="8">
                    <el-form-item label="实操成绩" prop="operateScore">
                        <el-input-number v-model="scoreForm.operateScore" size="small" controls-position="right"
                                         :disabled="true" style="width: 100%;"/>
                    </el-form-item>
                </el-col>
                <el-col :span="8">
                    <el-form-item label="成绩状态" prop="status">
                        <el-select v-model="scoreForm.status"   size="small" :disabled="true" style="width: 100%;" >
                            <el-option
                                    v-for="dict in scoreStatusOptions"
                                    :key="dict.code"
                                    :label="dict.name"
                                    :value="dict.code"
                            />
                        </el-select>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="8">
                    <el-form-item label="成绩类型" prop="scoreType">
                        <el-select v-model="scoreForm.scoreType"  size="small" :disabled="true" style="width: 100%;" >
                            <el-option
                                    v-for="dict in scoreTypeOptions"
                                    :key="dict.code"
                                    :label="dict.name"
                                    :value="dict.code"
                            />
                        </el-select>
                    </el-form-item>
                </el-col>
                <el-col :span="8" v-if="scoreForm.readDate != undefined && scoreForm.readDate != null ">
                    <el-form-item label="阅卷时间" prop="readDate">
                        <el-input  size="small" v-model="scoreForm.readDate" :disabled="true"/>
                    </el-form-item>
                </el-col>
                <el-col :span="8" v-if="scoreForm.readDate != undefined && scoreForm.readDate != null ">
                    <el-form-item label="阅卷人" prop="examinersNo">
                        <template slot-scope="scope">
                            <el-input  size="small" v-model="scoreForm.examinersNo+'-'+scoreForm.examinersName" :disabled="true"/>
                        </template>
                    </el-form-item>
                </el-col>
            </el-row>
        </el-form>
        <div class="dialog-footer" style="float:right">
            <el-button @click="cancel" size="small">关 闭</el-button>
        </div>
    </div>
</template>

<script>
    export default {
        name: "ScoreDetailForm",
        props: {
            // 成绩详情信息
            scoreForm: Object,
            // 成绩状态
            scoreStatusOptions: Array,
            // 成绩类型
            scoreTypeOptions: Array,

        },
        data() {
            return {

            }
        },
        created() {
            // console.log("成绩详情：",this.scoreForm);
        },
        methods: {
            // 取消按钮
            cancel() {
                // 清空
                this.$emit("cancelDialog");
            },
        }
    }
</script>

<style scoped>

</style>
